package org.hismig.migration.result;

import java.util.ArrayList;
import java.util.List;

/**
 * @declare: //TODO <br />
 *           This class created by Vansion.Hopihit on 2012-07-04 <br />
 *           <a href="mailto:vansionhopihit@gmail.com">Contact Me</a>
 * @version 1.0
 * @author Vansion.Hopihit
 * 
 */
public class BaseInfo {

	protected String name;

	protected long startTime;
	protected long endTime;

	protected List<Throwable> exceptions = new ArrayList<Throwable>();

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public long getEndTime() {
		return endTime;
	}

	public void setEndTime(long endTime) {
		this.endTime = endTime;
	}

	public long getExecuteTime() {
		return endTime - startTime;
	}

	public void addException(Throwable t) {
		exceptions.add(t);
	}

	public List<Throwable> getExceptions() {
		return exceptions;
	}

	public int getErrorCount() {
		return exceptions.size();
	}
}
